﻿using UnityEngine;
using System.Collections;
using evt;
public class PlayMethodView : MonoBehaviour {

	// Use this for initialization

	void Start () {
		ServerEventDispather.getInstance ().AddEventDispather (ServerEvent.SHOW_METHOD_VIEW,OpenView);
		EventTriggerListener.Get (gameObject).onClick = HideView;
		EventTriggerListener.Get (transform.GetChild(0).gameObject).onClick = OpenView;
		EventTriggerListener.Get (transform.GetChild(0).GetChild(0).GetChild(0).gameObject).onClick = HideView;
	}

	private void OpenView(object data){
		transform.localPosition = Vector3.zero;
	}

	private void HideView(object data){
		transform.localPosition = new Vector3(10000,0,0);
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
